home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Online / MagPLIP / s / build-aminet
AmigaDOS Script File  |  1998-05-12  |  3KB  |  90 lines

  1. .key RELEASENAME/A,BASENAME/A,VERSIONFILE/A,SOURCE/A,ROOT/A,IDS/A,CLEAN/S
  2. .bra {
  3. .ket }
  4. ;
  5. ; $VER: build-aminet 37.6 (04 Apr 1996)
  6. ;
  7. ; (C) Copyright 1996 Marius Gröger
  8. ;     All Rights Reserved.
  9. ;
  10. ; AmigaShell script to create an Aminet/Meeting Pearls release.
  11. ; The options in detail:
  12. ;
  13. ;    RELEASENAME
  14. ;        Unfortunately, the filing system used for Aminet CDs is only
  15. ;        capable of maintaining file names up to 21 characters length.
  16. ;        This parameter takes care of this: ideally meaning the same as
  17. ;        BASENAME, it should by an acronym for it.
  18. ;
  19. ;    VERSIONFILE
  20. ;        File to retrieve version/revision from.
  21. ;
  22. ;    BASENAME
  23. ;        Basename of the distribution.
  24. ;
  25. ;    SOURCE
  26. ;        Source file which contains the readme body text. The Aminet header
  27. ;        infos will be prepended.
  28. ;
  29. ;    ROOT
  30. ;        Distribution root directory. Here goes the readme to, and this is
  31. ;        what will be archived.
  32. ;
  33. ;    IDS
  34. ;        Textfile containing Aminet/MP classification and header information
  35. ;
  36. ;    CLEAN
  37. ;        If set, previous readmes are deleted.
  38. ;
  39. ;
  40. ; --------------------- customize this -----------------------
  41. Set LHA "C:Lha"
  42. Set TAR "C:tar"
  43. Set PACKDIR "Data:Release"
  44. Set LOGDIR "Logs:Release"
  45. ; ----------------- end of customization ---------------------
  46.  
  47. If EQ "CLEAN" {CLEAN}
  48.    Echo "=== removing obsolete readme's ==="
  49.    Delete QUIET "{ROOT}/{RELEASENAME}(%|[0-9])[0-9].[0-9](%|[0-9])(%|[0-9]).readme"
  50. Endif
  51.  
  52. If NOT EXISTS $PACKDIR/{RELEASENAME}
  53.   Makedir $PACKDIR/{RELEASENAME}
  54. EndIf
  55. Delete QUIET $PACKDIR/{RELEASENAME}/#?
  56.  
  57. Set relname "`version file {VERSIONFILE}`"
  58. Set version `rx "say word('$relname',2)"`
  59. Set relname {RELEASENAME}$version
  60. Type {IDS}    >>{ROOT}/$relname.readme
  61. Echo "Version: " $version >>{ROOT}/$relname.readme
  62. Type {SOURCE} >>{ROOT}/$relname.readme
  63. Copy {ROOT}/$relname.readme $PACKDIR/{RELEASENAME}/
  64.  
  65. Echo "=== creating lha archive ==="
  66. S:PCD //
  67. $LHA a -x -r $PACKDIR/{RELEASENAME}/$relname.lha {BASENAME}/~(#?.(gst|lnk|o|(opt0[0-9]0))) {BASENAME}.info
  68. S:PCD
  69. Echo "=== creating log file ==="
  70. Echo "-------------------------------------------------------------" >>$LOGDIR/{BASENAME}
  71. Echo "Distribution: {BASENAME}"                                      >>$LOGDIR/{BASENAME}
  72. Echo "Date: `date`"                                                  >>$LOGDIR/{BASENAME}
  73. Echo "Archive name: $relname.lha"                                    >>$LOGDIR/{BASENAME}
  74. Echo "-------------------------------------------------------------" >>$LOGDIR/{BASENAME}
  75. $LHA t $PACKDIR/{RELEASENAME}/$relname.lha                           >>$LOGDIR/{BASENAME}
  76. Echo "-------------------------------------------------------------" >>$LOGDIR/{BASENAME}
  77. Echo "ok."                                                           >>$LOGDIR/{BASENAME}
  78. Echo "-------------------------------------------------------------" >>$LOGDIR/{BASENAME}
  79. Echo ""                                                              >>$LOGDIR/{BASENAME}
  80.  
  81. Echo "=== creating tar archive ==="
  82. ;$TAR cvCf $PACKDIR $PACKDIR/{RELEASENAME}.tar {RELEASENAME}
  83.  
  84. UnSet relname
  85. UnSet TAR
  86. UnSet LHA
  87.  
  88. Echo "=== ready ==="
  89.  
  90.